home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11101 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
10% dexvert Text File (text/txt) fallback Supported
100% file Non-ISO extended-ASCII text default (weak)
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 65 6e 67 | 2e 63 6f 6e 76 65 78 2e |news.eng|.convex.|
|00000030| 63 6f 6d 21 61 72 63 6f | 21 75 73 65 6e 65 74 0a |com!arco|!usenet.|
|00000040| 46 72 6f 6d 3a 20 42 72 | 69 61 6e 20 4c 65 61 63 |From: Br|ian Leac|
|00000050| 68 20 3c 6c 61 73 62 66 | 6c 3e 0a 53 75 62 6a 65 |h <lasbf|l>.Subje|
|00000060| 63 74 3a 20 52 65 3a 20 | 43 4f 4f 4c 3a 20 53 6f |ct: Re: |COOL: So|
|00000070| 6d 65 74 68 69 6e 67 20 | 79 6f 75 20 63 61 6e 20 |mething |you can |
|00000080| 64 6f 20 69 6e 20 22 43 | 22 20 79 6f 75 20 63 61 |do in "C|" you ca|
|00000090| 6e 20 4e 4f 54 20 64 6f | 20 69 6e 20 22 43 2b 2b |n NOT do| in "C++|
|000000a0| 22 0a 58 2d 4e 6e 74 70 | 2d 50 6f 73 74 69 6e 67 |".X-Nntp|-Posting|
|000000b0| 2d 48 6f 73 74 3a 20 31 | 33 36 2e 32 32 36 2e 31 |-Host: 1|36.226.1|
|000000c0| 31 36 2e 31 0a 43 6f 6e | 74 65 6e 74 2d 54 79 70 |16.1.Con|tent-Typ|
|000000d0| 65 3a 20 74 65 78 74 2f | 70 6c 61 69 6e 3b 20 63 |e: text/|plain; c|
|000000e0| 68 61 72 73 65 74 3d 69 | 73 6f 2d 38 38 35 39 2d |harset=i|so-8859-|
|000000f0| 31 0a 4d 65 73 73 61 67 | 65 2d 49 44 3a 20 3c 44 |1.Messag|e-ID: <D|
|00000100| 6f 36 31 38 35 2e 45 71 | 4c 40 6e 65 77 73 2e 61 |o6185.Eq|L@news.a|
|00000110| 72 63 6f 2e 63 6f 6d 3e | 0a 54 6f 3a 20 66 6d 65 |rco.com>|.To: fme|
|00000120| 72 72 6f 77 40 77 69 7a | 61 72 64 2e 71 75 61 6c |rrow@wiz|ard.qual|
|00000130| 63 6f 6d 6d 2e 63 6f 6d | 0a 53 65 6e 64 65 72 3a |comm.com|.Sender:|
|00000140| 20 75 73 65 6e 65 74 40 | 6e 65 77 73 2e 61 72 63 | usenet@|news.arc|
|00000150| 6f 2e 63 6f 6d 0a 43 6f | 6e 74 65 6e 74 2d 54 72 |o.com.Co|ntent-Tr|
|00000160| 61 6e 73 66 65 72 2d 45 | 6e 63 6f 64 69 6e 67 3a |ansfer-E|ncoding:|
|00000170| 20 38 62 69 74 0a 4f 72 | 67 61 6e 69 7a 61 74 69 | 8bit.Or|ganizati|
|00000180| 6f 6e 3a 20 41 52 43 4f | 20 4f 69 6c 20 25 20 47 |on: ARCO| Oil % G|
|00000190| 61 73 20 43 6f 6d 70 61 | 6e 79 0a 52 65 66 65 72 |as Compa|ny.Refer|
|000001a0| 65 6e 63 65 73 3a 20 3c | 34 68 70 6f 76 33 24 6b |ences: <|4hpov3$k|
|000001b0| 72 62 40 71 75 61 6c 63 | 6f 6d 6d 2e 63 6f 6d 3e |rb@qualc|omm.com>|
|000001c0| 20 3c 34 69 30 76 73 31 | 24 69 6f 75 40 67 6f 6c | <4i0vs1|$iou@gol|
|000001d0| 32 2e 67 6f 6c 2e 63 6f | 6d 3e 0a 4d 69 6d 65 2d |2.gol.co|m>.Mime-|
|000001e0| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 0a 44 61 74 |Version:| 1.0.Dat|
|000001f0| 65 3a 20 54 75 65 2c 20 | 31 32 20 4d 61 72 20 31 |e: Tue, |12 Mar 1|
|00000200| 39 39 36 20 31 37 3a 34 | 33 3a 31 37 20 47 4d 54 |996 17:4|3:17 GMT|
|00000210| 0a 58 2d 4d 61 69 6c 65 | 72 3a 20 4d 6f 7a 69 6c |.X-Maile|r: Mozil|
|00000220| 6c 61 20 31 2e 31 32 20 | 28 58 31 31 3b 20 49 3b |la 1.12 |(X11; I;|
|00000230| 20 48 50 2d 55 58 20 41 | 2e 30 39 2e 30 35 20 39 | HP-UX A|.09.05 9|
|00000240| 30 30 30 2f 37 35 35 29 | 0a 58 2d 55 72 6c 3a 20 |000/755)|.X-Url: |
|00000250| 6e 65 77 73 3a 34 69 30 | 76 73 31 24 69 6f 75 40 |news:4i0|vs1$iou@|
|00000260| 67 6f 6c 32 2e 67 6f 6c | 2e 63 6f 6d 0a 0a 67 6c |gol2.gol|.com..gl|
|00000270| 65 76 61 6e 64 40 67 6f | 6c 2e 63 6f 6d 20 28 47 |evand@go|l.com (G|
|00000280| 65 6f 66 66 72 65 79 20 | 4c 65 76 61 6e 64 29 20 |eoffrey |Levand) |
|00000290| 77 72 6f 74 65 3a 0a 3e | 66 6d 65 72 72 6f 77 40 |wrote:.>|fmerrow@|
|000002a0| 77 69 7a 61 72 64 2e 71 | 75 61 6c 63 6f 6d 6d 2e |wizard.q|ualcomm.|
|000002b0| 63 6f 6d 20 28 46 72 61 | 6e 6b 20 4d 65 72 72 6f |com (Fra|nk Merro|
|000002c0| 77 29 20 77 72 6f 74 65 | 3a 0a 3e 0a 3e 3e 49 20 |w) wrote|:.>.>>I |
|000002d0| 61 6d 20 74 65 61 63 68 | 69 6e 67 20 6d 79 73 65 |am teach|ing myse|
|000002e0| 6c 66 20 43 2b 2b 2c 20 | 62 75 74 20 6d 79 20 69 |lf C++, |but my i|
|000002f0| 6e 74 65 72 65 73 74 20 | 69 6e 20 74 68 65 20 6c |nterest |in the l|
|00000300| 61 6e 67 75 61 67 65 20 | 6a 75 73 74 20 64 72 6f |anguage |just dro|
|00000310| 70 70 65 64 2e 0a 3e 3e | 49 20 77 61 6e 74 20 74 |pped..>>|I want t|
|00000320| 6f 20 72 65 61 64 20 63 | 69 6e 20 61 73 20 61 20 |o read c|in as a |
|00000330| 62 69 6e 61 72 79 20 66 | 69 6c 65 20 61 6e 64 20 |binary f|ile and |
|00000340| 6f 75 74 70 75 74 20 63 | 6f 75 74 20 74 68 65 20 |output c|out the |
|00000350| 73 61 6d 65 20 61 73 20 | 77 65 6c 6c 2e 20 20 49 |same as |well. I|
|00000360| 20 72 65 61 64 0a 3e 3e | 74 68 65 20 46 41 51 73 | read.>>|the FAQs|
|00000370| 20 6f 6e 20 43 2b 2b 20 | 61 6e 64 20 67 75 65 73 | on C++ |and gues|
|00000380| 73 20 77 68 61 74 20 59 | 4f 55 20 43 41 4e 27 54 |s what Y|OU CAN'T|
|00000390| 20 44 4f 20 49 54 2e 0a | 3e 0a 3e 49 92 6d 20 6e | DO IT..|>.>I.m n|
|000003a0| 6f 74 20 71 75 69 74 65 | 20 73 75 72 65 20 77 68 |ot quite| sure wh|
|000003b0| 61 74 20 79 6f 75 20 6d | 65 61 6e 20 62 79 20 22 |at you m|ean by "|
|000003c0| 72 65 61 64 20 63 69 6e | 20 61 73 20 61 20 62 69 |read cin| as a bi|
|000003d0| 6e 61 72 79 20 66 69 6c | 65 22 2c 20 62 75 74 0a |nary fil|e", but.|
|000003e0| 3e 79 6f 75 20 63 61 6e | 20 63 6f 64 65 20 75 70 |>you can| code up|
|000003f0| 20 3c 3c 20 61 6e 64 20 | 3e 3e 20 6f 70 65 72 61 | << and |>> opera|
|00000400| 74 6f 72 73 20 66 6f 72 | 20 74 68 65 20 6f 62 6a |tors for| the obj|
|00000410| 65 63 74 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |ect you |want to |
|00000420| 64 6f 20 69 2f 6f 0a 3e | 77 69 74 68 2e 20 20 4e |do i/o.>|with. N|
|00000430| 6f 74 20 68 61 72 64 20 | 74 6f 20 64 6f 2c 20 62 |ot hard |to do, b|
|00000440| 75 74 20 74 68 65 20 73 | 74 72 65 61 6d 20 63 6c |ut the s|tream cl|
|00000450| 61 73 73 65 73 20 73 65 | 65 6d 20 71 75 69 74 65 |asses se|em quite|
|00000460| 20 63 6f 6e 76 6f 6c 75 | 74 65 64 0a 3e 66 6f 72 | convolu|ted.>for|
|00000470| 20 74 68 65 20 62 65 67 | 69 6e 6e 65 72 2e 0a 3e | the beg|inner..>|
|00000480| 0a 3e 54 6f 6d 20 53 77 | 61 6e 20 64 69 73 63 75 |.>Tom Sw|an discu|
|00000490| 73 73 65 73 20 68 6f 77 | 20 74 6f 20 64 6f 20 73 |sses how| to do s|
|000004a0| 6f 6d 65 20 62 69 6e 61 | 72 79 20 69 2f 6f 20 6f |ome bina|ry i/o o|
|000004b0| 6e 65 20 6f 66 20 68 69 | 73 20 62 6f 6f 6b 73 2e |ne of hi|s books.|
|000004c0| 20 20 54 68 65 0a 3e 74 | 69 74 6c 65 20 77 61 73 | The.>t|itle was|
|000004d0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 6c 69 6b 65 20 | somethi|ng like |
|000004e0| 22 43 2b 2b 20 43 6f 64 | 65 20 53 65 63 72 65 74 |"C++ Cod|e Secret|
|000004f0| 73 22 2e 0a 3e 0a 3e 47 | 2e 20 4c 65 76 61 6e 64 |s"..>.>G|. Levand|
|00000500| 20 0a 0a 46 72 61 6e 6b | 20 69 73 20 6e 6f 74 20 | ..Frank| is not |
|00000510| 63 6f 72 72 65 63 74 2c | 20 74 68 65 20 70 75 74 |correct,| the put|
|00000520| 20 61 6e 64 20 67 65 74 | 20 6d 65 6d 62 65 72 20 | and get| member |
|00000530| 66 75 6e 63 74 69 6f 6e | 73 20 61 6c 6c 6f 77 20 |function|s allow |
|00000540| 62 69 6e 61 72 79 0a 6f | 70 65 72 61 74 69 6f 6e |binary.o|peration|
|00000550| 73 20 6f 6e 20 73 74 72 | 65 61 6d 73 2e 0a 0a 59 |s on str|eams...Y|
|00000560| 6f 75 20 61 72 65 20 61 | 6c 73 6f 20 66 72 65 65 |ou are a|lso free|
|00000570| 20 74 6f 20 63 72 65 61 | 74 65 20 79 6f 75 72 20 | to crea|te your |
|00000580| 6f 77 6e 20 63 6c 61 73 | 73 20 61 73 20 47 65 6f |own clas|s as Geo|
|00000590| 66 66 72 65 79 20 4c 65 | 76 61 6e 64 20 73 74 61 |ffrey Le|vand sta|
|000005a0| 74 65 73 2e 0a 49 20 75 | 73 65 20 52 6f 67 75 65 |tes..I u|se Rogue|
|000005b0| 20 57 61 76 65 20 54 6f | 6f 6c 73 2e 68 2b 2b 2c | Wave To|ols.h++,|
|000005c0| 20 61 6e 64 20 74 68 65 | 79 20 70 72 6f 76 69 64 | and the|y provid|
|000005d0| 65 20 63 6c 61 73 73 65 | 73 20 63 61 6c 6c 65 64 |e classe|s called|
|000005e0| 20 52 57 62 69 73 74 72 | 65 61 6d 0a 61 6e 64 20 | RWbistr|eam.and |
|000005f0| 52 57 62 6f 73 74 72 65 | 61 6d 20 77 68 69 63 68 |RWbostre|am which|
|00000600| 20 64 6f 20 70 72 65 63 | 69 73 65 6c 79 20 74 68 | do prec|isely th|
|00000610| 61 74 2e 20 4f 6e 65 20 | 6f 66 20 74 68 65 20 63 |at. One |of the c|
|00000620| 6f 6e 73 74 72 75 63 74 | 6f 72 73 20 69 73 0a 20 |onstruct|ors is. |
|00000630| 20 20 20 52 57 62 69 73 | 74 72 65 61 6d 28 69 73 | RWbis|tream(is|
|00000640| 74 72 65 61 6d 26 20 73 | 74 72 29 3b 0a 0a 77 68 |tream& s|tr);..wh|
|00000650| 69 63 68 20 6d 65 61 6e | 73 20 79 6f 75 20 73 68 |ich mean|s you sh|
|00000660| 6f 75 6c 64 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |ould be |able to |
|00000670| 69 6e 69 74 69 61 6c 69 | 7a 65 20 69 74 20 61 73 |initiali|ze it as|
|00000680| 3a 0a 20 20 20 20 52 57 | 62 69 73 74 72 65 61 6d |:. RW|bistream|
|00000690| 20 62 69 6e 61 72 79 5f | 73 74 72 65 61 6d 28 63 | binary_|stream(c|
|000006a0| 69 6e 29 3b 0a 0a 74 68 | 65 6e 20 75 73 65 20 69 |in);..th|en use i|
|000006b0| 74 20 61 73 20 79 6f 75 | 20 77 6f 75 6c 64 20 61 |t as you| would a|
|000006c0| 6e 79 20 6f 74 68 65 72 | 20 73 74 72 65 61 6d 2e |ny other| stream.|
|000006d0| 0a 0a 49 20 6d 75 73 74 | 20 63 6f 6e 66 65 73 73 |..I must| confess|
|000006e0| 20 49 20 68 61 76 65 6e | 27 74 20 68 61 64 20 6e | I haven|'t had n|
|000006f0| 65 65 64 20 74 6f 20 64 | 6f 20 74 68 69 73 2c 20 |eed to d|o this, |
|00000700| 73 6f 20 69 74 20 69 73 | 20 75 6e 74 65 73 74 65 |so it is| unteste|
|00000710| 64 2c 20 62 75 74 0a 61 | 66 74 65 72 20 32 2b 20 |d, but.a|fter 2+ |
|00000720| 79 65 61 72 73 20 6f 66 | 20 75 73 69 6e 67 20 74 |years of| using t|
|00000730| 68 65 69 72 20 6c 69 62 | 72 61 72 69 65 73 2c 20 |heir lib|raries, |
|00000740| 49 20 68 61 76 65 20 66 | 75 6c 6c 20 74 72 75 73 |I have f|ull trus|
|00000750| 74 20 74 68 61 74 20 69 | 74 0a 77 69 6c 6c 20 77 |t that i|t.will w|
|00000760| 6f 72 6b 2e 0a 0a 2d 42 | 72 69 61 6e 20 3a 2d 29 |ork...-B|rian :-)|
|00000770| 0a 2d 2d 20 0a 42 72 69 | 61 6e 20 46 2e 20 4c 65 |.-- .Bri|an F. Le|
|00000780| 61 63 68 0a 53 72 2e 20 | 53 79 73 74 65 6d 73 20 |ach.Sr. |Systems |
|00000790| 41 6e 61 6c 79 73 74 0a | 6c 61 73 62 66 6c 40 61 |Analyst.|lasbfl@a|
|000007a0| 61 69 2e 61 72 63 6f 2e | 63 6f 6d 0a 0a 54 65 6c |ai.arco.|com..Tel|
|000007b0| 65 70 68 6f 6e 65 3a 09 | 28 39 30 37 29 20 32 36 |ephone:.|(907) 26|
|000007c0| 33 2d 34 38 36 30 0a 46 | 41 58 3a 09 09 28 39 30 |3-4860.F|AX:..(90|
|000007d0| 37 29 20 32 36 35 2d 36 | 32 39 38 0a 0a 41 52 43 |7) 265-6|298..ARC|
|000007e0| 4f 20 41 6c 61 73 6b 61 | 2c 20 49 6e 63 2e 0a 41 |O Alaska|, Inc..A|
|000007f0| 54 4f 2d 31 36 35 36 0a | 50 2e 4f 2e 20 42 6f 78 |TO-1656.|P.O. Box|
|00000800| 20 31 30 30 33 36 30 0a | 41 6e 63 68 6f 72 61 67 | 100360.|Anchorag|
|00000810| 65 2c 20 41 4b 20 39 39 | 35 31 30 2d 30 33 36 30 |e, AK 99|510-0360|
|00000820| 0a 0a | |.. | |
+--------+-------------------------+-------------------------+--------+--------+